import $http from '@/service/request.js'

//功能：保存我的实验
//接口：/myexpers
//POST
export const _savemyexper = (data) =>{
	return $http.request({
		url:'/myexpers',
		method:'POST',
		header:{
			"Content-Type":"application/json"
		},
		data
	})
}

//功能：修改我的实验
//接口：/myexpers
//PUT
export const _updatemyexper = (data) =>{
	return $http.request({
		url:'/myexpers',
		method:'PUT',
		header:{
			"Content-Type":"application/json"
		},
		data
	})
}

//功能：根据账号查询所有自定义实验
//接口：/myexpers/account/{account}
//GET
export const _getallmyexper = (account) =>{
	return $http.request({
		url:'/myexpers/account' + '/' + account,
		method:'GET',
		header:{
			"Content-Type":"application/json"
		}
	})
}


//功能：根据id查询自定义实验
//接口：/myexpers/id/{id}
//GET
export const _getbyid = (id) =>{
	return $http.request({
		url:'/myexpers/id' + '/' + id,
		method:'GET',
		header:{
			"Content-Type":"application/json"
		}
	})
}

//功能：根据id删除实验
//接口：/myexpers/{id}
//DELETE
export const _deletebyid = (id) =>{
	return $http.request({
		url:'/myexpers' + '/' + id,
		method:'DELETE',
		header:{
			"Content-Type":"application/json"
		}
	})
}